home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Testing & Debugging / Show Globals ƒ / About Show Globals next >
Encoding:
Text File  |  1990-05-18  |  3.0 KB  |  85 lines  |  [TEXT/KAHL]

  1.  
  2.  
  3.     Show Globals 1.0    © Copyright 1989 Apple Computer, Inc.
  4.     
  5.     Programmed by Ricardo Batista, Apple Integrated Systems
  6.     
  7. About...
  8.     
  9.     Show Globals is a MultiFinder compatible application that can read MPW
  10.     assembler files (could be fake) and remember global variable declarations
  11.     in the code, this is done so you can watch the values of your variables
  12.     change in a scrollable window.  The comments after a semicolon are also
  13.     shown in the scrollable window.
  14.     
  15.     Notice that even if your code is written in C or Pascal you can easily
  16.     create a dummy assembly file containing the declaration of your variables
  17.     as in assembly, no need to know assembly other than how to declare storage.
  18.     
  19.     I use this utitlity mainly to debug drivers and code resources such as
  20.     an atlk code resource.
  21.     
  22.     
  23.     When the program starts, it wants you to select a source file, ussually an
  24.     asembly source file, the file is read and the program finds the first
  25.     declaration of the label 'DDATA' at the beginning of a line; from
  26.     then on all declarations are calculated until an empty line is found.
  27.     The address of the start of the data in memory can be entered in the program
  28.     by choosing the Set Start Address item from the file menu, or can be hardcoded
  29.     in the file by adding DDATA=address to the label, an indirection can be obtained
  30.     by adding an asterisk, hexadecimal values must have a dollar sign in front and
  31.     are only allowed in the DDATA label.
  32.     Examples:
  33.     
  34.     DDATA        ; no specific begin of data, user will provide start address at runtime
  35.     DDATA=$910    ; data begins at address 910 hexadecimal (CurApName in this case)
  36.     DDATA=2320    ; data begins at address 2320 decimal ($910 CurApName)
  37.     DDATA=*$2d8    ; pointer to begin of data is contained in $2d8 (ABusVars in this case)
  38.     DDATA=*728    ; pointer to begin of data is contained in 728  (ABusVars in this case)
  39.     
  40.     data types know are:
  41.     
  42.         dc.b value
  43.         dc.w value
  44.         dc.l value
  45.         
  46.         dcb.b value, value, ...,value
  47.         dcb.w value, value, ...,value
  48.         dcb.l value, value, ...,value
  49.     
  50.     Sorry, no records ...
  51.     The limit of declarations is 250, I have used this tool succesfully with about
  52.     80 declarations.  I recommend you that you have a signature as part of your
  53.     variables to make sure that you are looking at the right memory space.
  54.     
  55.     A few working examples....
  56.     
  57.     
  58. DData=*$2d8
  59.     dc.b 0            ; AppleTalk Node address
  60.     dc.b 0            ; destination node, RHA begin
  61.     dc.b 0            ; source node
  62.     dc.b 0            ; lap type
  63.     dc.b 0            ; hop count and two bits of packet len
  64.     dc.b 0            ; low byte of packet len
  65.     dcb.b 19,0        ; RHA, dest, source, lap type
  66.     dc.b 0            ; sysABridge (current bridge)
  67.     dc.w 0            ; sysNetNum (our network number)
  68.     dc.w 0            ; vSCCEnable, value to reenable SCC interrupts
  69.     dc.l 0            ; ATPVars (pointer to ATP variables)
  70.  
  71.  
  72.  
  73. DData=$900
  74.     dc.w 0        ; current application reference number
  75.     dc.b 0        ; launch flag
  76.     dc.b 0        ; ?
  77.     dc.l 0        ; current A5
  78.     dc.l 0        ; current stack base
  79.     dc.l 0        ; ?
  80.     dcb.b 32,0    ; current application name
  81.     dc.l 0        ; handle to code 0 resource at launch
  82.     dc.w 0        ; offset from current a5 to start of jump table
  83.     dc.w 0        ; current page 2 vide and sound configuration
  84.  
  85.